<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{model.title} - {site.name}</title>
<meta name="keywords" content="{model.seo_keywords}" />
<meta name="description" content="{model.seo_description}" />
<link href="{config.webpath}css/pagination.css" rel="stylesheet" />
<link href="<%templateskin%>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="{config.webpath}scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/common.js"></script>
</head>

<body>
<!--Header-->
<%template src="_header.html"%>
<!--/Header-->

<div class="section clearfix">
  <div class="ntitle">
    <h2>
      <a href="javascript:;">{model.title}</a>
    </h2>
    <%set string category_nav=get_category_menu("news_list", category_id)%>
    <span>当前位置：<a href="<%linkurl("index")%>">首页</a> &gt; <a href="<%linkurl("news")%>">新闻资讯</a>{category_nav}</span>
  </div>
  
  <!--右边-->
  <div class="list-right">
    <div class="sidebar-box">
      <div class="line30"></div>
      <h3>资讯类别</h3>
      <ul class="navbar">
        <%set DataTable categoryList1=get_category_child_list(channel, 0)%>
        <%foreach(DataRow cdr1 in categoryList1.Rows)%>
        <li>
          <h4><a href="<%linkurl("news_list",{cdr1[id]})%>">{cdr1[title]}</a></h4>
          <p>
            <%set DataTable categoryList2=get_category_child_list(channel, {strtoint({cdr1[id]})})%>
            <%foreach(DataRow cdr2 in categoryList2.Rows)%>
            <%if({strtoint({cdr2[id]})}=={category_id})%>
            <a href="<%linkurl("news_list",{cdr2[id]})%>" class="selected">{cdr2[title]}</a>
            <%else%>
            <a href="<%linkurl("news_list",{cdr2[id]})%>">{cdr2[title]}</a>
            <%/if%>
            <%/foreach%>
          </p>
        </li>
        <%/foreach%>
      </ul>
      <div class="line20"></div>
      <h3>推荐资讯</h3>
      <div class="focus-list">
        <ul>
          <%set DataTable redNews=get_article_list(channel, 0, 4, "status=0 and is_red=1 and img_url<>''")%>
          <%foreach(DataRow dr in redNews.Rows)%>
          <li>
            <a title="{dr[title]}" href="<%linkurl("news_show",{dr[id]})%>">
              <b><img src="{dr[img_url]}" /></b>
              <span>{dr[title]}</span>
            </a>
          </li>
          <%/foreach%>
        </ul>
      </div>
      <div class="line10"></div>
      <h3>人气排行</h3>
      <ul class="rank-list">
        <%set DataTable hotNews=get_article_list(channel, 0, 10, "status=0", "click desc,id desc")%>
        <%loop hotdr hotNews%>
        <%if(hotdr__loop__id==1)%>
        <li class="active">
        <%else%>
        <li>
        <%/if%>
          <span><%datetostr({hotdr[add_time]},MM-dd)%></span>
          <i class="num"><%=hotdr__loop__id%></i><a href="<%linkurl("news_show",{hotdr[id]})%>">{hotdr[title]}</a>
        </li>
        <%/loop%>
      </ul>
      
    </div>
  </div>
  <!--/右边-->
  
  <!--左边-->
  <div class="list-auto">
    <ul class="n-list">
      <%set DataTable newsList=get_article_list(channel, category_id, pagesize, page, "status=0", out totalcount, out pagelist, "news_list", category_id, "__id__")%><!--取得一个分页DataTable-->
      <%foreach(DataRow dr in newsList.Rows)%>
      <li>
        <h2><a href="<%linkurl("news_show",{dr[id]})%>">{dr[title]}</a></h2>
        <div class="note">
          <%if({dr[img_url]}!="")%>
          <b><img src="{dr[img_url]}" /></b>
          <%/if%>
          <p>{dr[zhaiyao]}</p>
          <div class="info">
            <span class="time">{dr[add_time]}</span>
            <span class="comm"><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_comment_count&id={dr[id]}"></script>人评论</span>
            <span class="view"><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_article_click&id={dr[id]}"></script>次浏览</span>
          </div>
        </div>
      </li>
      <%/foreach%>
    </ul>
    
    <!--页码列表-->
    <div class="page-box">
      <div class="digg">{pagelist}</div>
    </div>
    <!--/页码列表-->
  </div>
  <!--/左边-->

</div>

<!--Footer-->
<%template src="_footer.html"%>
<!--/Footer-->
</body>
</html>